#import "CableImaginationCell.h"


@implementation CableImaginationCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {

		self.selectionStyle = UITableViewCellSelectionStyleNone;
		//self.contentView.backgroundColor = UIColor.whiteColor;

		//: 初始化UI布局
		[self pioneerMotionDreamInitUI];
	}
	return self;
}

- (void)setMandala:(CableImaginationModel *)mandala {
	_mandala = mandala;

	//: 配置cell的UI



	NSString *prism = [NSString stringWithFormat:@"%ld", mandala.juggleAmberWisp];
	self.zealLabel.text = prism;

	NSString *arcane = [NSString stringWithFormat:@"%ld", mandala.juggleAmberWisp];
	self.marbleJuggleLabel.text = arcane;

	self.upliftLabel.text = [NSString stringWithFormat:@"Count: %lu", (unsigned long)mandala.forestQuakeRadiant.count];

[self.velvetImageView sd_setImageWithURL:[NSURL URLWithString:mandala.wandererZestfulEclipse.stringValue] placeholderImage:nil];



}
- (UITextView *)umbrellaQuakeTextView {
	if (!_umbrellaQuakeTextView) {
	
        _umbrellaQuakeTextView = [[UITextView alloc] init];
	}
	return _umbrellaQuakeTextView;
}

- (UITextView *)insectRippleTonicTextView {
	if (!_insectRippleTonicTextView) {
	
        _insectRippleTonicTextView = [UITextView new];
        _insectRippleTonicTextView.frame = CGRectMake(43, 32, 86, 182);
	}
	return _insectRippleTonicTextView;
}

- (UIImageView *)velvetImageView {
	if (!_velvetImageView) {
	
        _velvetImageView = [UIImageView new];
        _velvetImageView.contentMode = UIViewContentModeScaleAspectFill;
        _velvetImageView.clipsToBounds = YES;
        _velvetImageView.layer.cornerRadius = 12;
        _velvetImageView.layer.masksToBounds = YES;
        _velvetImageView.size = CGSizeMake(45, 184);
        _velvetImageView.left = 42;
        _velvetImageView.top = 1;
        UIImage *journeyGlimmer = [UIImage imageNamed:@"images/image_8.png"];
        if (journeyGlimmer) {
	        _velvetImageView.image = journeyGlimmer;
        }
	}
	return _velvetImageView;
}

- (void)pioneerMotionDreamInitUI {

    //: 描述_0
    self.nebulaKaleidoscopeImageView = [[UIImageView alloc] init];
    self.nebulaKaleidoscopeImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.nebulaKaleidoscopeImageView.clipsToBounds = YES;
    self.nebulaKaleidoscopeImageView.layer.cornerRadius = 18;
    self.nebulaKaleidoscopeImageView.layer.masksToBounds = YES;
    self.nebulaKaleidoscopeImageView.size = CGSizeMake(186, 151);
    self.nebulaKaleidoscopeImageView.left = 47;
    self.nebulaKaleidoscopeImageView.top = 46;
    UIImage *yonderInspireYard = [UIImage imageNamed:@"images/image_0.png"];
    if (yonderInspireYard) {
	    self.nebulaKaleidoscopeImageView.image = yonderInspireYard;
    }
    [self.contentView addSubview:self.nebulaKaleidoscopeImageView];


    //: 描述_1
    UILabel *duskYarnEclipse = [[UILabel alloc] initWithFrame:CGRectZero];
    duskYarnEclipse.text = @"label_1";
    duskYarnEclipse.font = [UIFont systemFontOfSize:17 weight:UIFontWeightBold];
    duskYarnEclipse.textColor = [UIColor colorWithRed:14/255.0 green:194/255.0 blue:194/255.0 alpha:0.7];
    duskYarnEclipse.textAlignment = NSTextAlignmentLeft;
    //: 不用理会的骚操作 = duskYarnEclipse.numberOfLines = 1;
    NSInteger questTangleBrave = 1;
    if (questTangleBrave>40 && questTangleBrave < 4746) {
	    questTangleBrave = 12;
    }
    duskYarnEclipse.numberOfLines = questTangleBrave;
    self.zealLabel = duskYarnEclipse;
    [self.contentView addSubview:duskYarnEclipse];
	[self.zealLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(91);
		make.height.mas_equalTo(71);
		make.bottom.equalTo(@(22));
	}];


    //: 描述_2
    self.marbleJuggleLabel = [UILabel new];
    self.marbleJuggleLabel.size = CGSizeMake(174, 173);
    self.marbleJuggleLabel.left = 15;
    self.marbleJuggleLabel.top = 26;
    self.marbleJuggleLabel.text = @"label_2";
    self.marbleJuggleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
    self.marbleJuggleLabel.textColor = [UIColor colorWithRed:32/255.0 green:235/255.0 blue:179/255.0 alpha:0.8];
    self.marbleJuggleLabel.textAlignment = NSTextAlignmentRight;
    self.marbleJuggleLabel.numberOfLines = 0;
    [self.contentView addSubview:self.marbleJuggleLabel];


    //: 描述_3
    self.naturalXylophoneGraspTextView = [UITextView new];
    [self.contentView addSubview:self.naturalXylophoneGraspTextView];
	[self.naturalXylophoneGraspTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(185);
		make.height.mas_equalTo(52);
		make.top.equalTo(@(23));
	}];

	//: 描述_4
	[self.contentView addSubview:self.umbrellaQuakeTextView];
	[self.umbrellaQuakeTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(156);
		make.height.mas_equalTo(163);
		make.bottom.equalTo(@(21));
	}];

	//: 描述_5
	[self.contentView addSubview:self.insectRippleTonicTextView];


    //: 描述_6
    UITextField *vivid = [[UITextField alloc] initWithFrame:CGRectZero];
    vivid.frame = CGRectMake(44, 42, 181, 107);
    self.quakeOdysseyVortexTextField = vivid;
    [self.contentView addSubview:vivid];


    //: 描述_7
    UILabel *melodyYardXenon = [[UILabel alloc] initWithFrame:CGRectZero];
    melodyYardXenon.size = CGSizeMake(73, 53);
    melodyYardXenon.left = 37;
    melodyYardXenon.top = 23;
    melodyYardXenon.text = @"label_7";
    melodyYardXenon.font = [UIFont systemFontOfSize:19 weight:UIFontWeightBold];
    melodyYardXenon.textColor = [UIColor colorWithRed:244/255.0 green:178/255.0 blue:99/255.0 alpha:0.8];
    melodyYardXenon.textAlignment = NSTextAlignmentRight;
    //: 不用理会的骚操作 = melodyYardXenon.numberOfLines = 1;
    NSInteger perceptiveDriftZestful = 1;
    if (perceptiveDriftZestful>27 && perceptiveDriftZestful < 9064) {
	    perceptiveDriftZestful = 22;
    }
    melodyYardXenon.numberOfLines = perceptiveDriftZestful;
    self.upliftLabel = melodyYardXenon;
    [self.contentView addSubview:melodyYardXenon];

	//: 描述_8
	[self.contentView addSubview:self.velvetImageView];


    //: 描述_9
    UIImageView *hopeful = [UIImageView new];
    hopeful.contentMode = UIViewContentModeScaleAspectFill;
    hopeful.clipsToBounds = YES;
    hopeful.layer.cornerRadius = 16;
    hopeful.layer.masksToBounds = YES;

    self.yearnPeacefulImageView = hopeful;
    [self.contentView addSubview:hopeful];
	[self.yearnPeacefulImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(45);
		make.height.mas_equalTo(181);
		make.bottom.equalTo(@(15));
	}];
}


@end
